package cn.idu.ismik.sample.reflection;

import java.util.Arrays;

/**
 * 反射获取类结构
 */
public class Test08 {
    public static void main(String[] args) throws ClassNotFoundException {
        Class c1 = Class.forName("cn.idu.ismik.sample.reflection.User");

        System.out.println(c1.getName());
        System.out.println(c1.getSimpleName());

        System.out.println(Arrays.toString(c1.getDeclaredFields()));

        System.out.println(Arrays.toString(c1.getDeclaredMethods()));
    }
}
